﻿<phone:PhoneApplicationPage x:Class="BingMaps.View.ImageryPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP7"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            d:DesignHeight="768"
                            d:DesignWidth="480"
                            shell:SystemTray.IsVisible="True"
                            DataContext="{Binding ImageryViewModel, Source={StaticResource Locator}}">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="768" />
        </Grid.RowDefinitions>

        <!--Pivot Control-->
        <controls:Pivot Title="BING MAPS SERVICE DEMO">
            <!--Pivot item one-->
            <controls:PivotItem Header="Options">
                <StackPanel x:Name="ContentPanel"
                            Grid.Row="1">
                    <toolkit:ListPicker x:Name="SupportedImagerySet"
                                        ItemsSource="{Binding ImagerySet}"
                                        SelectedItem="{Binding CurrentlySelectedImagerySet, Mode=TwoWay}" />
                    <toolkit:ListPicker x:Name="OptimizeRoute"
                                        ItemsSource="{Binding OptimizeRoute}"
                                        SelectedItem="{Binding CurrentlySelectedOptimize, Mode=TwoWay}" />
                    <toolkit:ListPicker x:Name="Avoid"
                                        ItemsSource="{Binding Avoid}"
                                        SelectedItem="{Binding CurrentlySelectedAvoid, Mode=TwoWay}" />
                    <toolkit:ListPicker x:Name="ModeOfTravel"
                                        ItemsSource="{Binding ModeOfTravel}"
                                        SelectedItem="{Binding CurrentlySelectedModeOfTravel, Mode=TwoWay}" />
                    <Slider x:Name="ZoomLevel"
                            Value="{Binding CurrentlySelectedZoomLevel, Mode=TwoWay}"
                            LargeChange="5"
                            SmallChange="1"
                            Maximum="18" />
                    <ScrollViewer Height="195" Margin="0" VerticalAlignment="Bottom">
                        <StackPanel Orientation="Vertical">
                            <Button Content="Center Point"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectCenterPointCommand}"
                                    d:LayoutOverrides="Width" />
                            <Button Content="Center Point With Route"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectCenterPointWithRouteCommand}"
                                    d:LayoutOverrides="Width" />
                            <Button Content="Specific Area"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectSpecificAreaCommand}"
                                    d:LayoutOverrides="Width" />
                            <Button Content="Specific Area With Route"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectSpecificAreaWithRouteCommand}"
                                    d:LayoutOverrides="Width" />
                            <Button Content="Route"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectRouteCommand}"
                                    d:LayoutOverrides="Width" />
                            <Button Content="Query"
                                    cmd:ButtonBaseExtensions.Command="{Binding SelectQueryCommand}"
                                    d:LayoutOverrides="Width" />
                        </StackPanel>
                    </ScrollViewer>
                </StackPanel>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="Image">
                <Image Source="{Binding Path=StaticMap}" />
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>
</phone:PhoneApplicationPage>
